Switch to #pragma once for headers
authorColin Walters <walters@verbum.org>
Tue, 9 Jul 2013 22:53:22 +0000 (18:53 -0400)
committerColin Walters <walters@verbum.org>
Tue, 9 Jul 2013 22:53:22 +0000 (18:53 -0400)
It's just less tedious, and we're GCC/LLVM specific anyways.

36 files changed:
src/libostree/ostree-chain-input-stream.h
src/libostree/ostree-checksum-input-stream.h
src/libostree/ostree-core.h
src/libostree/ostree-diff.h
src/libostree/ostree-libarchive-input-stream.h
src/libostree/ostree-mutable-tree.h
src/libostree/ostree-repo-file-enumerator.h
src/libostree/ostree-repo-file.h
src/libostree/ostree-repo.h
src/libostree/ostree-traverse.h
src/libostree/ostree-types.h
src/libostree/ostree.h
src/libotutil/ot-checksum-utils.h
src/libotutil/ot-gio-utils.h
src/libotutil/ot-keyfile-utils.h
src/libotutil/ot-opt-utils.h
src/libotutil/ot-spawn-utils.h
src/libotutil/ot-unix-utils.h
src/libotutil/ot-variant-utils.h
src/libotutil/ot-waitable-queue.h
src/libotutil/otutil.h
src/ostree/ostree-curl-fetcher.h
src/ostree/ostree-fetcher.h
src/ostree/ostree-prune.h
src/ostree/ostree-pull.h
src/ostree/ot-admin-builtins.h
src/ostree/ot-admin-deploy.h
src/ostree/ot-admin-functions.h
src/ostree/ot-bootloader-syslinux.h
src/ostree/ot-bootloader.h
src/ostree/ot-builtins.h
src/ostree/ot-config-parser.h
src/ostree/ot-deployment.h
src/ostree/ot-main.h
src/ostree/ot-ordered-hash.h
src/switchroot/ostree-mount-util.h

index ac9a8ac5d3b8088248cd88ca39a0c6fec3220a7c..dbfea36d941638d58d1d5f8b46e8daa76f2eccf2 100644 (file)
@@ -19,8 +19,7 @@
  *
  */
 
-#ifndef __OSTREE_CHAIN_INPUT_STREAM_H__
-#define __OSTREE_CHAIN_INPUT_STREAM_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -64,4 +63,3 @@ OstreeChainInputStream * ostree_chain_input_stream_new          (GPtrArray *stre
 
 G_END_DECLS
 
-#endif /* __OSTREE_CHAIN_INPUT_STREAM_H__ */
index 32676b075374620da0219a7b132edeb72e9c990b..88b1a0a2fa71816d7f719e61c54fcaf57ab3043b 100644 (file)
@@ -19,8 +19,7 @@
  *
  */
 
-#ifndef __OSTREE_CHECKSUM_INPUT_STREAM_H__
-#define __OSTREE_CHECKSUM_INPUT_STREAM_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -65,4 +64,3 @@ OstreeChecksumInputStream * ostree_checksum_input_stream_new          (GInputStr
 
 G_END_DECLS
 
-#endif /* __OSTREE_CHECKSUM_INPUT_STREAM_H__ */
index 93ec5ec7b07ab2ff7617e4aa00116987dfc6675d..c94025078e82b3d0e7b50d8f0ec712bb76de034d 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef _OSTREE_CORE
-#define _OSTREE_CORE
+#pragma once
 
 #include <otutil.h>
 
@@ -308,4 +307,5 @@ gboolean ostree_validate_structureof_dirtree (GVariant      *index,
 gboolean ostree_validate_structureof_dirmeta (GVariant      *index,
                                               GError       **error);
 
-#endif /* _OSTREE_REPO */
+
+G_END_DECLS
index ba6d63f9354fcaa3b87fe9c2c6c36f1a519bbdc3..c193e9483b94e23cb6fbbdb5173677de229c175f 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef _OSTREE_DIFF
-#define _OSTREE_DIFF
+#pragma once
 
 #include "ostree-core.h"
 #include "ostree-types.h"
@@ -62,4 +61,3 @@ void ostree_diff_print (GFile          *a,
 
 G_END_DECLS
 
-#endif /* _OSTREE_REPO */
index e31b1ecb47a84612e03f79a9c5e6c3d8f95fd28e..df18c05481b34672e198c79b6932613e4c5dbc7a 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Alexander Larsson <alexl@redhat.com>
  */
 
-#ifndef __OSTREE_LIBARCHIVE_INPUT_STREAM_H__
-#define __OSTREE_LIBARCHIVE_INPUT_STREAM_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -65,4 +64,3 @@ GInputStream * ostree_libarchive_input_stream_new          (struct archive  *a);
 
 G_END_DECLS
 
-#endif /* __OSTREE_LIBARCHIVE_INPUT_STREAM_H__ */
index 643c6fb9b29494e08c3043f7577dc614056d8704..a288b1a121eee2536d7112c67bd3f4f28973d7d7 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef _OSTREE_MUTABLE_TREE
-#define _OSTREE_MUTABLE_TREE
+#pragma once
 
 #include "ostree-types.h"
 
@@ -94,4 +93,3 @@ GHashTable * ostree_mutable_tree_get_files (OstreeMutableTree *self);
 
 G_END_DECLS
 
-#endif
index 4c3d2245dbd9170d9e6f3855f1c813d071e89d05..6acf1006eddb2138c368e6ab25f07025862cddaa 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef _OSTREE_REPO_FILE_ENUMERATOR
-#define _OSTREE_REPO_FILE_ENUMERATOR
+#pragma once
 
 #include "ostree-repo-file.h"
 
@@ -54,4 +53,3 @@ GFileEnumerator * _ostree_repo_file_enumerator_new      (OstreeRepoFile       *d
 
 G_END_DECLS
 
-#endif
index b8cc23c68954f18dd0b5a29e4301d77b267aed55..8541641f3c8f0d50d008d7e2a49bb660be1be992 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef _OSTREE_REPO_FILE
-#define _OSTREE_REPO_FILE
+#pragma once
 
 #include "ostree-types.h"
 
@@ -96,4 +95,3 @@ GVariant *ostree_repo_file_tree_get_metadata (OstreeRepoFile  *self);
 
 G_END_DECLS
 
-#endif
index 6417b91724ddf3adf3c1031774e5e231c8331d4a..6a694ee53b8d5f6a087984aa4f5718a365df8b93 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef _OSTREE_REPO
-#define _OSTREE_REPO
+#pragma once
 
 #include "ostree-core.h"
 #include "ostree-types.h"
@@ -320,4 +319,3 @@ gboolean ostree_repo_list_objects (OstreeRepo                  *self,
 
 G_END_DECLS
 
-#endif /* _OSTREE_REPO */
index 9d5cb7f0cd4bd8b00ae13b2641d928f85f3d833f..59a9adea5ea2626874b73e2d75343727f12adaa0 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef _OSTREE_TRAVERSE
-#define _OSTREE_TRAVERSE
+#pragma once
 
 #include "ostree-core.h"
 #include "ostree-types.h"
@@ -45,4 +44,3 @@ gboolean ostree_traverse_commit (OstreeRepo         *repo,
 
 G_END_DECLS
 
-#endif /* _OSTREE_REPO */
index af1ae0dc631afe2af3ff7e5d98a0c1143f180c72..5370aac7573b98f659aecfbe69870d907716f035 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef _OSTREE_TYPES
-#define _OSTREE_TYPES
+#pragma once
 
 #include <gio/gio.h>
 
@@ -36,4 +35,3 @@ typedef struct OstreeRepoFile OstreeRepoFile;
 
 G_END_DECLS
 
-#endif
index 3734af66b3b70486a0f1ee42067e41e444f44324..ea75f6f7c0d78dc3d67cd0e3446c40074b5b5a98 100644 (file)
@@ -20,7 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OSTREE_H__
+#pragma once
 
 #include <ostree-checksum-input-stream.h>
 #include <ostree-chain-input-stream.h>
@@ -30,5 +30,3 @@
 #include <ostree-repo-file.h>
 #include <ostree-traverse.h>
 #include <ostree-diff.h>
-
-#endif
index 67ff9dba4d605dd8d96c0ab31bb14f33515ecc3e..7778ed09464ee067a99b60adaf0bffb114955421 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OSTREE_CHECKSUM_UTILS_H__
-#define __OSTREE_CHECKSUM_UTILS_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -65,5 +64,3 @@ guchar * ot_gio_checksum_stream_finish (GInputStream   *in,
                                         GError        **error);
 
 G_END_DECLS
-
-#endif
index 5ebf04a3665c03a771c33e50f5ef06bf7f31457a..184c770b97bcc5e0ca9d245ce055b202c6f48052 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OSTREE_GIO_UTILS_H__
-#define __OSTREE_GIO_UTILS_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -81,4 +80,3 @@ gboolean ot_gfile_atomic_symlink_swap (GFile          *path,
 
 G_END_DECLS
 
-#endif
index b5fb74da8ebdaa3a89a1ac3608bbed9a18b6375f..057cc638fe5fe5320a2ce8931814028b86a9f0ed 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OSTREE_KEYFILE_UTILS_H__
-#define __OSTREE_KEYFILE_UTILS_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -46,4 +45,3 @@ ot_keyfile_get_value_with_default (GKeyFile      *keyfile,
 
 G_END_DECLS
 
-#endif
index fdcfd3314d565281de336dc3047704aa3ab21552..d538d5294bc5bd251dad96b567d30f8e466bee95 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OSTREE_OPT_UTILS_H__
-#define __OSTREE_OPT_UTILS_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -31,4 +30,3 @@ void ot_util_usage_error (GOptionContext *context, const char *message, GError *
 
 G_END_DECLS
 
-#endif
index 4e85fc85bcddd72460670bc7ce8bb60b967e8f90..158bd26113201d4971930dd35479c750ae2c4185 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OSTREE_SPAWN_UTILS_H__
-#define __OSTREE_SPAWN_UTILS_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -33,4 +32,3 @@ GThreadPool * ot_thread_pool_new_nproc (GFunc     func,
 
 G_END_DECLS
 
-#endif
index 58dd59b5a0a103a17c70e71f68ae6659e602ed85..ed15379fb2a1572095d492c4e9b705ed17f7c02a 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OSTREE_UNIX_UTILS_H__
-#define __OSTREE_UNIX_UTILS_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -51,4 +50,3 @@ void ot_util_set_error_from_errno (GError **error, gint saved_errno);
 
 G_END_DECLS
 
-#endif
index 1dec5c4704a23fddea3930f4f3c201203dea391c..e8f8f5ff51ddcb9ccb1a03c850fa4f156ece90e6 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OSTREE_VARIANT_UTILS_H__
-#define __OSTREE_VARIANT_UTILS_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -56,4 +55,3 @@ GInputStream *ot_variant_read (GVariant             *variant);
 
 G_END_DECLS
 
-#endif
index 0fcd7de8a5d7e3588591150e3d9e356944395a46..9f23c8f8bd87312674fd83cc073f0567e43cc28b 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OSTREE_WAITABLE_QUEUE_H__
-#define __OSTREE_WAITABLE_QUEUE_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -44,4 +43,3 @@ void ot_waitable_queue_unref (OtWaitableQueue *queue);
 
 G_END_DECLS
 
-#endif
index 014e7fc27ec07b55b65a8ea2ba71c2ca6bcdcaaf..57f32743fa7bc7e49641f4602270d84d6496e0b9 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OSTREE_UTIL_H__
-#define __OSTREE_UTIL_H__
+#pragma once
 
 #include <gio/gio.h>
 #include <libgsystem.h>
@@ -48,4 +47,3 @@
 
 void ot_ptrarray_add_many (GPtrArray  *a, ...) G_GNUC_NULL_TERMINATED; 
 
-#endif
index d7276aaccc70c2e30c7c9e51dd81de36248a5cd9..2351ea6f9e8e1f7d7c4753827820e29ee07f5034 100644 (file)
@@ -18,8 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef _OSTREE_CURL_FETCHER
-#define _OSTREE_CURL_FETCHER
+#pragma once
 
 #include <gio/gio.h>
 
@@ -56,4 +55,3 @@ GFile *ostree_curl_fetcher_request_uri_finish (OstreeCurlFetcher         *self,
 
 G_END_DECLS
 
-#endif
index 4692f6a0913dc423adb36f2f77b1c01dfdf56416..8be7b01ff0c6a3959a9e4ac5c571eb276e5dcb42 100644 (file)
@@ -18,8 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef _OSTREE_FETCHER
-#define _OSTREE_FETCHER
+#pragma once
 
 #define LIBSOUP_USE_UNSTABLE_REQUEST_API
 #include <libsoup/soup.h>
@@ -71,4 +70,3 @@ GFile *ostree_fetcher_request_uri_finish (OstreeFetcher         *self,
 
 G_END_DECLS
 
-#endif
index a5ce935099e5abd2b1db8cc25f95b573315cda72..882fb60338b005914041ceeaf7d41c67448f9918 100644 (file)
@@ -18,8 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef __OT_PRUNE_H__
-#define __OT_PRUNE_H__
+#pragma once
 
 #include "ostree.h"
 
@@ -42,4 +41,3 @@ gboolean ostree_prune (OstreeRepo        *repo,
 
 G_END_DECLS
 
-#endif /* __OT_PRUNE_H__ */
index bf287502ec358c039c8da184d9fb91565652a6fa..ee6927ee4c86fe5fbee5e1d17e647ac36d3ea67c 100644 (file)
@@ -18,8 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef __OT_PULL_H__
-#define __OT_PULL_H__
+#pragma once
 
 #include "ostree.h"
 
@@ -39,4 +38,3 @@ gboolean ostree_pull (OstreeRepo        *repo,
 
 G_END_DECLS
 
-#endif /* __OT_PRUNE_H__ */
index 307e0e269f3d5d0a44b990ac2e9aaf17cc91f82a..293922829d19eb14591b4ac19754f2fe0b4d2d78 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OT_ADMIN_BUILTINS__
-#define __OT_ADMIN_BUILTINS__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -42,4 +41,3 @@ gboolean ot_admin_builtin_upgrade (int argc, char **argv, OtAdminBuiltinOpts *ad
 
 G_END_DECLS
 
-#endif
index 1eab703c76b0c485031faaf9e75203a4a11c7384..d5dfa833652d3e10b46f3a1f0da2e3adbf739a5b 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OT_ADMIN_DEPLOY__
-#define __OT_ADMIN_DEPLOY_
+#pragma once
 
 #include <gio/gio.h>
 #include "ot-deployment.h"
@@ -48,4 +47,3 @@ gboolean ot_admin_deploy (GFile             *sysroot,
 
 G_END_DECLS
 
-#endif
index 21195b56f9eedc8eac87dc45b18284ac619e310f..a77147281c246373e2ae2a143e741b506d02a397 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OT_ADMIN_FUNCTIONS__
-#define __OT_ADMIN_FUNCTIONS__
+#pragma once
 
 #include <gio/gio.h>
 #include "ostree.h"
@@ -120,4 +119,3 @@ GKeyFile *ot_origin_new_from_refspec (const char *refspec);
 
 G_END_DECLS
 
-#endif
index 8a810895928c47d216a029f6dd58f9865457346f..3324b781e2fc4d1bc292ded2d2d4884483901449 100644 (file)
@@ -18,8 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef __OT_BOOTLOADER_SYSLINUX_H__
-#define __OT_BOOTLOADER_SYSLINUX_H__
+#pragma once
 
 #include "ot-bootloader.h"
 
@@ -37,4 +36,3 @@ OtBootloaderSyslinux * ot_bootloader_syslinux_new (GFile *sysroot);
 
 G_END_DECLS
 
-#endif /* __OT_BOOTLOADER_SYSLINUX_H__ */
index 6043b83cfefd6ff0d4f28d1c410dbc2bfa1171ff..098291a81a3658e1717f7e56eeaf72eba2a67e46 100644 (file)
@@ -18,8 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef __OT_BOOTLOADER_H__
-#define __OT_BOOTLOADER_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -56,4 +55,3 @@ gboolean ot_bootloader_write_config (OtBootloader  *self,
 
 G_END_DECLS
 
-#endif /* __OT_BOOTLOADER_H__ */
index 9847c5a4822e8505cf14dd3bf2888ee179347b1c..6719f0f2182d265cef331e6cdf06f3166f969e85 100644 (file)
@@ -20,8 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#ifndef __OSTREE_BUILTINS__
-#define __OSTREE_BUILTINS__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -50,4 +49,3 @@ gboolean ostree_builtin_trivial_httpd (int argc, char **argv, GFile *repo_path,
 
 G_END_DECLS
 
-#endif
index 8b7b47a9f5701af0e07a2f5f5aeac963dd57236f..37424faa7855db607e2cb51eed359ff2f070d4b9 100644 (file)
@@ -18,8 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef __OT_CONFIG_PARSER_H__
-#define __OT_CONFIG_PARSER_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -55,4 +54,3 @@ const char *ot_config_parser_get (OtConfigParser  *self,
 
 G_END_DECLS
 
-#endif /* __OT_CONFIG_PARSER_H__ */
index 66470d46cc771458e159e3117a36a7ad4ce5c71b..bb9a3c07df16b0c53e0f27cc47ccbe77bb7536e4 100644 (file)
@@ -18,8 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef __OT_DEPLOYMENT_H__
-#define __OT_DEPLOYMENT_H__
+#pragma once
 
 #include <gio/gio.h>
 #include "ot-config-parser.h"
@@ -63,4 +62,3 @@ OtDeployment *ot_deployment_clone (OtDeployment *self);
 
 G_END_DECLS
 
-#endif /* __OT_DEPLOYMENT_H__ */
index f7e632b01fa5a04d7300d44a0e2b2cfb07893c66..c7981b508f9dc1cf9b3100fed7704ecd15379e67 100644 (file)
@@ -20,6 +20,8 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
+#pragma once
+
 #include <gio/gio.h>
 
 typedef enum {
index a3a4ef8277a92f6eb9f479ccca8c91035ebe7af0..1a3aa09b6b2ff7d4c3489c4c8be6ae31a0e50da9 100644 (file)
@@ -18,8 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef __OT_ORDERED_HASH_H__
-#define __OT_ORDERED_HASH_H__
+#pragma once
 
 #include <gio/gio.h>
 
@@ -43,4 +42,3 @@ void ot_ordered_hash_replace_key (OtOrderedHash  *ohash,
 
 G_END_DECLS
 
-#endif /* __OT_ORDERED_HASH_H__ */
index a6fdaffe88c4be8365bd399849618f7c7d7181fb..a149d5257b3684c3f5f77767852987cf33eacf7a 100644 (file)
@@ -19,9 +19,7 @@
  *
  */
 
-#ifndef _OSTREE_MOUNT_UTIL_H
-#define _OSTREE_MOUNT_UTIL_H
+#pragma once
 
 int perrorv (const char *format, ...) __attribute__ ((format (printf, 1, 2)));
 
-#endif